//
// UDriver.java
// Copyright (C) 2010  "Naush" <naush _ hotmail _ fr>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>./* ----------------------------------------------------------------------------







package org.ryzom.nel.threed;

import org.ryzom.nel.misc.CEventListenerAsync;
import org.ryzom.nel.misc.CEventServer;
import org.ryzom.nel.misc.CQuad;
import org.ryzom.nel.misc.CRGBA;

public class UDriver {
  private long swigCPtr;
  protected boolean swigCMemOwn;

  public UDriver(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

  public static long getCPtr(UDriver obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

	public static class CMode {
		private long swigCPtr;
		protected boolean swigCMemOwn;

		public CMode(long cPtr, boolean cMemoryOwn) {
			swigCMemOwn = cMemoryOwn;
			swigCPtr = cPtr;
		}
		public CMode()
		{
			this(nel3dJNIAddition.new_UDriver_CMode_1(),true);
		}
		public CMode(int i, int j, byte b, boolean windowed, int frequency, byte aa) {
			this(nel3dJNIAddition.new_UDriver_CMode_2(i,j,b, windowed, frequency, aa),true);
		}
		public CMode(int i, int j, byte b) {
			this(nel3dJNIAddition.new_UDriver_CMode_2(i,j,b, true, 0, (byte)-1),true);
		}
		public static long getCPtr(CMode obj) {
			return (obj == null) ? 0 : obj.swigCPtr;
		}
	}
  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        nel3dJNI.delete_UDriver(swigCPtr);
      }
      swigCPtr = 0;
    }
  }

  public void setEventServer(CEventServer value) {
    nel3dJNI.UDriver_EventServer_set(swigCPtr, this, CEventServer.getCPtr(value));
  }

  public CEventServer getEventServer() {
    return new CEventServer(nel3dJNI.UDriver_EventServer_get(swigCPtr, this), true);
  }

  public void setAsyncListener(CEventListenerAsync value) {
    nel3dJNI.UDriver_AsyncListener_set(swigCPtr, this, CEventListenerAsync.getCPtr(value));
  }

  public CEventListenerAsync getAsyncListener() {
    return new CEventListenerAsync(nel3dJNI.UDriver_AsyncListener_get(swigCPtr, this), true);
  }

  public boolean isLost() {
    return nel3dJNI.UDriver_isLost(swigCPtr, this);
  }

  public void disableHardwareVertexProgram() {
    nel3dJNI.UDriver_disableHardwareVertexProgram(swigCPtr, this);
  }

  public void disableHardwareVertexArrayAGP() {
    nel3dJNI.UDriver_disableHardwareVertexArrayAGP(swigCPtr, this);
  }

  public void disableHardwareTextureShader() {
    nel3dJNI.UDriver_disableHardwareTextureShader(swigCPtr, this);
  }

  public boolean setDisplay(CMode mode, boolean show, boolean resizeable) {
    return nel3dJNI.UDriver_setDisplay__SWIG_0(swigCPtr, this, CMode.getCPtr(mode), show, resizeable);
  }

  public boolean setDisplay(CMode mode, boolean show) {
    return nel3dJNI.UDriver_setDisplay__SWIG_1(swigCPtr, this, CMode.getCPtr(mode), show);
  }

  public boolean setDisplay(CMode mode) {
    return nel3dJNI.UDriver_setDisplay__SWIG_2(swigCPtr, this, CMode.getCPtr(mode));
  }

  public boolean setDisplay(int wnd, CMode mode, boolean show, boolean resizeable) {
    return nel3dJNI.UDriver_setDisplay__SWIG_3(swigCPtr, this, wnd, CMode.getCPtr(mode), show, resizeable);
  }

  public boolean setDisplay(int wnd, CMode mode, boolean show) {
    return nel3dJNI.UDriver_setDisplay__SWIG_4(swigCPtr, this, wnd, CMode.getCPtr(mode), show);
  }

  public boolean setDisplay(int wnd, CMode mode) {
    return nel3dJNI.UDriver_setDisplay__SWIG_5(swigCPtr, this, wnd, CMode.getCPtr(mode));
  }

  public boolean setMode(CMode mode) {
    return nel3dJNI.UDriver_setMode(swigCPtr, this, CMode.getCPtr(mode));
  }

  public boolean getModes(SWIGTYPE_p_std__vectorT_NL3D__CMode_t modes) {
    return nel3dJNI.UDriver_getModes(swigCPtr, this, SWIGTYPE_p_std__vectorT_NL3D__CMode_t.getCPtr(modes));
  }

  public boolean getCurrentScreenMode(CMode mode) {
    return nel3dJNI.UDriver_getCurrentScreenMode(swigCPtr, this, CMode.getCPtr(mode));
  }

  public void setWindowTitle(SWIGTYPE_p_ucstring title) {
    nel3dJNI.UDriver_setWindowTitle(swigCPtr, this, SWIGTYPE_p_ucstring.getCPtr(title));
  }

  public void setWindowIcon(SWIGTYPE_p_std__vectorT_NLMISC__CBitmap_t bitmaps) {
    nel3dJNI.UDriver_setWindowIcon(swigCPtr, this, SWIGTYPE_p_std__vectorT_NLMISC__CBitmap_t.getCPtr(bitmaps));
  }

  public void setWindowPos(int x, int y) {
    nel3dJNI.UDriver_setWindowPos(swigCPtr, this, x, y);
  }

  public void showWindow(boolean show) {
    nel3dJNI.UDriver_showWindow__SWIG_0(swigCPtr, this, show);
  }

  public void showWindow() {
    nel3dJNI.UDriver_showWindow__SWIG_1(swigCPtr, this);
  }

  public void beginDialogMode() {
    nel3dJNI.UDriver_beginDialogMode(swigCPtr, this);
  }

  public void endDialogMode() {
    nel3dJNI.UDriver_endDialogMode(swigCPtr, this);
  }

  public void release() {
    nel3dJNI.UDriver_release(swigCPtr, this);
  }

  public boolean activate() {
    return nel3dJNI.UDriver_activate(swigCPtr, this);
  }

  public boolean isActive() {
    return nel3dJNI.UDriver_isActive(swigCPtr, this);
  }

  public int getDisplay() {
    return nel3dJNI.UDriver_getDisplay(swigCPtr, this);
  }

  public void clearRGBABuffer(CRGBA col) {
    nel3dJNI.UDriver_clearRGBABuffer__SWIG_0(swigCPtr, this, CRGBA.getCPtr(col), col);
  }

  public void clearRGBABuffer() {
    nel3dJNI.UDriver_clearRGBABuffer__SWIG_1(swigCPtr, this);
  }

  public void clearZBuffer() {
    nel3dJNI.UDriver_clearZBuffer(swigCPtr, this);
  }

  public void clearBuffers(CRGBA col) {
    nel3dJNI.UDriver_clearBuffers__SWIG_0(swigCPtr, this, CRGBA.getCPtr(col), col);
  }

  public void clearBuffers() {
    nel3dJNI.UDriver_clearBuffers__SWIG_1(swigCPtr, this);
  }

  public void swapBuffers() {
    nel3dJNI.UDriver_swapBuffers(swigCPtr, this);
  }

  public void finish() {
    nel3dJNI.UDriver_finish(swigCPtr, this);
  }

  public void flush() {
    nel3dJNI.UDriver_flush(swigCPtr, this);
  }

  public void setSwapVBLInterval(long interval) {
    nel3dJNI.UDriver_setSwapVBLInterval(swigCPtr, this, interval);
  }

  public long getSwapVBLInterval() {
    return nel3dJNI.UDriver_getSwapVBLInterval(swigCPtr, this);
  }

  public boolean fogEnabled() {
    return nel3dJNI.UDriver_fogEnabled(swigCPtr, this);
  }

  public void enableFog(boolean enable) {
    nel3dJNI.UDriver_enableFog(swigCPtr, this, enable);
  }

  public void setupFog(float start, float end, CRGBA color) {
    nel3dJNI.UDriver_setupFog(swigCPtr, this, start, end, CRGBA.getCPtr(color), color);
  }

  public void setLight(short num, ULight light) {
    nel3dJNI.UDriver_setLight(swigCPtr, this, num, ULight.getCPtr(light), light);
  }

  public void enableLight(short num, boolean enable) {
    nel3dJNI.UDriver_enableLight__SWIG_0(swigCPtr, this, num, enable);
  }

  public void enableLight(short num) {
    nel3dJNI.UDriver_enableLight__SWIG_1(swigCPtr, this, num);
  }

  public void setAmbientColor(CRGBA color) {
    nel3dJNI.UDriver_setAmbientColor(swigCPtr, this, CRGBA.getCPtr(color), color);
  }

  public void setCullMode(UDriver.TCullMode cullMode) {
    nel3dJNI.UDriver_setCullMode(swigCPtr, this, cullMode.swigValue());
  }

  public UDriver.TCullMode getCullMode() {
    return UDriver.TCullMode.swigToEnum(nel3dJNI.UDriver_getCullMode(swigCPtr, this));
  }

  public void enableStencilTest(boolean enable) {
    nel3dJNI.UDriver_enableStencilTest(swigCPtr, this, enable);
  }

  public boolean isStencilTestEnabled() {
    return nel3dJNI.UDriver_isStencilTestEnabled(swigCPtr, this);
  }

  public void stencilFunc(UDriver.TStencilFunc stencilFunc, int ref, long mask) {
    nel3dJNI.UDriver_stencilFunc(swigCPtr, this, stencilFunc.swigValue(), ref, mask);
  }

  public void stencilOp(UDriver.TStencilOp fail, UDriver.TStencilOp zfail, UDriver.TStencilOp zpass) {
    nel3dJNI.UDriver_stencilOp(swigCPtr, this, fail.swigValue(), zfail.swigValue(), zpass.swigValue());
  }

  public void stencilMask(long mask) {
    nel3dJNI.UDriver_stencilMask(swigCPtr, this, mask);
  }

  public UScene createScene(boolean bSmallScene) {
    long cPtr = nel3dJNI.UDriver_createScene(swigCPtr, this, bSmallScene);
    return (cPtr == 0) ? null : new UScene(cPtr, false);
  }

  public void deleteScene(UScene scene) {
    nel3dJNI.UDriver_deleteScene(swigCPtr, this, UScene.getCPtr(scene), scene);
  }

  public UAnimationSet createAnimationSet(boolean headerOptim) {
    long cPtr = nel3dJNI.UDriver_createAnimationSet__SWIG_0(swigCPtr, this, headerOptim);
    return (cPtr == 0) ? null : new UAnimationSet(cPtr, false);
  }

  public UAnimationSet createAnimationSet() {
    long cPtr = nel3dJNI.UDriver_createAnimationSet__SWIG_1(swigCPtr, this);
    return (cPtr == 0) ? null : new UAnimationSet(cPtr, false);
  }

  public UAnimationSet createAnimationSet(String animationSetFile) {
    long cPtr = nel3dJNI.UDriver_createAnimationSet__SWIG_2(swigCPtr, this, animationSetFile);
    return (cPtr == 0) ? null : new UAnimationSet(cPtr, false);
  }

  public void deleteAnimationSet(UAnimationSet animationSet) {
    nel3dJNI.UDriver_deleteAnimationSet(swigCPtr, this, UAnimationSet.getCPtr(animationSet), animationSet);
  }

  public UTextContext createTextContext(String fontFileName, String fontExFileName) {
    long cPtr = nel3dJNI.UDriver_createTextContext__SWIG_0(swigCPtr, this, fontFileName, fontExFileName);
    return (cPtr == 0) ? null : new UTextContext(cPtr, false);
  }

  public UTextContext createTextContext(String fontFileName) {
    long cPtr = nel3dJNI.UDriver_createTextContext__SWIG_1(swigCPtr, this, fontFileName);
    return (cPtr == 0) ? null : new UTextContext(cPtr, false);
  }

  public void deleteTextContext(UTextContext textContext) {
    nel3dJNI.UDriver_deleteTextContext(swigCPtr, this, UTextContext.getCPtr(textContext), textContext);
  }

  public void setFontManagerMaxMemory(long maxMem) {
    nel3dJNI.UDriver_setFontManagerMaxMemory(swigCPtr, this, maxMem);
  }

  public String getFontManagerCacheInformation() {
    return nel3dJNI.UDriver_getFontManagerCacheInformation(swigCPtr, this);
  }

  public UTextureFile createTextureFile(String file) {
    long cPtr = nel3dJNI.UDriver_createTextureFile(swigCPtr, this, file);
    return (cPtr == 0) ? null : new UTextureFile(cPtr, false);
  }

  public void deleteTextureFile(UTextureFile textfile) {
    nel3dJNI.UDriver_deleteTextureFile(swigCPtr, this, UTextureFile.getCPtr(textfile), textfile);
  }

  public UTextureMem createTextureMem(long width, long height, SWIGTYPE_p_NL3D__CBitmap__TType texType) {
    long cPtr = nel3dJNI.UDriver_createTextureMem__SWIG_0(swigCPtr, this, width, height, SWIGTYPE_p_NL3D__CBitmap__TType.getCPtr(texType));
    return (cPtr == 0) ? null : new UTextureMem(cPtr, false);
  }

  public UTextureMem createTextureMem(long width, long height) {
    long cPtr = nel3dJNI.UDriver_createTextureMem__SWIG_1(swigCPtr, this, width, height);
    return (cPtr == 0) ? null : new UTextureMem(cPtr, false);
  }

  public void deleteTextureMem(UTextureMem textraw) {
    nel3dJNI.UDriver_deleteTextureMem(swigCPtr, this, UTextureMem.getCPtr(textraw), textraw);
  }

  public UMaterial createMaterial() {
    return new UMaterial(nel3dJNI.UDriver_createMaterial(swigCPtr, this), true);
  }

  public void deleteMaterial(UMaterial mat) {
    nel3dJNI.UDriver_deleteMaterial(swigCPtr, this, UMaterial.getCPtr(mat), mat);
  }

  public void setScissor(CScissor arg0) {
    nel3dJNI.UDriver_setScissor(swigCPtr, this, CScissor.getCPtr(arg0), arg0);
  }

  public CScissor getScissor() {
    return new CScissor(nel3dJNI.UDriver_getScissor(swigCPtr, this), true);
  }

  public void setViewport(CViewport arg0) {
    nel3dJNI.UDriver_setViewport(swigCPtr, this, CViewport.getCPtr(arg0), arg0);
  }

  public CViewport getViewport() {
    return new CViewport(nel3dJNI.UDriver_getViewport(swigCPtr, this), true);
  }

  public void setFrustum(CFrustum frust) {
    nel3dJNI.UDriver_setFrustum(swigCPtr, this, CFrustum.getCPtr(frust), frust);
  }

  public CFrustum getFrustum() {
    return new CFrustum(nel3dJNI.UDriver_getFrustum(swigCPtr, this), true);
  }

  public void setFrustumMatrix(SWIGTYPE_p_NLMISC__CMatrix frust) {
    nel3dJNI.UDriver_setFrustumMatrix(swigCPtr, this, SWIGTYPE_p_NLMISC__CMatrix.getCPtr(frust));
  }

  public SWIGTYPE_p_NLMISC__CMatrix getFrustumMatrix() {
    return new SWIGTYPE_p_NLMISC__CMatrix(nel3dJNI.UDriver_getFrustumMatrix(swigCPtr, this), true);
  }

  public float getClipSpaceZMin() {
    return nel3dJNI.UDriver_getClipSpaceZMin(swigCPtr, this);
  }

  public void setViewMatrix(SWIGTYPE_p_NLMISC__CMatrix mat) {
    nel3dJNI.UDriver_setViewMatrix(swigCPtr, this, SWIGTYPE_p_NLMISC__CMatrix.getCPtr(mat));
  }

  public SWIGTYPE_p_NLMISC__CMatrix getViewMatrix() {
    return new SWIGTYPE_p_NLMISC__CMatrix(nel3dJNI.UDriver_getViewMatrix(swigCPtr, this), true);
  }

  public void setModelMatrix(SWIGTYPE_p_NLMISC__CMatrix mat) {
    nel3dJNI.UDriver_setModelMatrix(swigCPtr, this, SWIGTYPE_p_NLMISC__CMatrix.getCPtr(mat));
  }

  public SWIGTYPE_p_NLMISC__CMatrix getModelMatrix() {
    return new SWIGTYPE_p_NLMISC__CMatrix(nel3dJNI.UDriver_getModelMatrix(swigCPtr, this), true);
  }

  public void setMatrixMode2D(CFrustum frust) {
    nel3dJNI.UDriver_setMatrixMode2D(swigCPtr, this, CFrustum.getCPtr(frust), frust);
  }

  public void setMatrixMode2D11() {
    nel3dJNI.UDriver_setMatrixMode2D11(swigCPtr, this);
  }

  public void setMatrixMode2D43() {
    nel3dJNI.UDriver_setMatrixMode2D43(swigCPtr, this);
  }

  public void setMatrixMode3D(UCamera camera) {
    nel3dJNI.UDriver_setMatrixMode3D(swigCPtr, this, UCamera.getCPtr(camera), camera);
  }

  public void setDepthRange(float znear, float zfar) {
    nel3dJNI.UDriver_setDepthRange(swigCPtr, this, znear, zfar);
  }

  public void getDepthRange(SWIGTYPE_p_float znear, SWIGTYPE_p_float zfar) {
    nel3dJNI.UDriver_getDepthRange(swigCPtr, this, SWIGTYPE_p_float.getCPtr(znear), SWIGTYPE_p_float.getCPtr(zfar));
  }

  public void setColorMask(boolean bRed, boolean bGreen, boolean bBlue, boolean bAlpha) {
    nel3dJNI.UDriver_setColorMask(swigCPtr, this, bRed, bGreen, bBlue, bAlpha);
  }

  public void drawLine(SWIGTYPE_p_NLMISC__CLine tri, UMaterial mat) {
    nel3dJNI.UDriver_drawLine__SWIG_0(swigCPtr, this, SWIGTYPE_p_NLMISC__CLine.getCPtr(tri), UMaterial.getCPtr(mat), mat);
  }

  public void drawLine(SWIGTYPE_p_NLMISC__CLineColor tri, UMaterial mat) {
    nel3dJNI.UDriver_drawLine__SWIG_1(swigCPtr, this, SWIGTYPE_p_NLMISC__CLineColor.getCPtr(tri), UMaterial.getCPtr(mat), mat);
  }

  public void drawLine(SWIGTYPE_p_NLMISC__CLineUV tri, UMaterial mat) {
    nel3dJNI.UDriver_drawLine__SWIG_2(swigCPtr, this, SWIGTYPE_p_NLMISC__CLineUV.getCPtr(tri), UMaterial.getCPtr(mat), mat);
  }

  public void drawLine(SWIGTYPE_p_NLMISC__CLineColorUV tri, UMaterial mat) {
    nel3dJNI.UDriver_drawLine__SWIG_3(swigCPtr, this, SWIGTYPE_p_NLMISC__CLineColorUV.getCPtr(tri), UMaterial.getCPtr(mat), mat);
  }

  public void drawTriangle(CTriangle tri, UMaterial mat) {
    nel3dJNI.UDriver_drawTriangle__SWIG_0(swigCPtr, this, CTriangle.getCPtr(tri), tri, UMaterial.getCPtr(mat), mat);
  }

  public void drawTriangle(SWIGTYPE_p_NLMISC__CTriangleColor tri, UMaterial mat) {
    nel3dJNI.UDriver_drawTriangle__SWIG_1(swigCPtr, this, SWIGTYPE_p_NLMISC__CTriangleColor.getCPtr(tri), UMaterial.getCPtr(mat), mat);
  }

  public void drawTriangle(SWIGTYPE_p_NLMISC__CTriangleUV tri, UMaterial mat) {
    nel3dJNI.UDriver_drawTriangle__SWIG_2(swigCPtr, this, SWIGTYPE_p_NLMISC__CTriangleUV.getCPtr(tri), UMaterial.getCPtr(mat), mat);
  }

  public void drawTriangle(SWIGTYPE_p_NLMISC__CTriangleColorUV tri, UMaterial mat) {
    nel3dJNI.UDriver_drawTriangle__SWIG_3(swigCPtr, this, SWIGTYPE_p_NLMISC__CTriangleColorUV.getCPtr(tri), UMaterial.getCPtr(mat), mat);
  }

  public void drawQuad(CQuad tri, UMaterial mat) {
    nel3dJNI.UDriver_drawQuad__SWIG_0(swigCPtr, this, CQuad.getCPtr(tri), tri, UMaterial.getCPtr(mat), mat);
  }

  public void drawQuad(SWIGTYPE_p_NLMISC__CQuadColor tri, UMaterial mat) {
    nel3dJNI.UDriver_drawQuad__SWIG_1(swigCPtr, this, SWIGTYPE_p_NLMISC__CQuadColor.getCPtr(tri), UMaterial.getCPtr(mat), mat);
  }

  public void drawQuad(SWIGTYPE_p_NLMISC__CQuadUV tri, UMaterial mat) {
    nel3dJNI.UDriver_drawQuad__SWIG_2(swigCPtr, this, SWIGTYPE_p_NLMISC__CQuadUV.getCPtr(tri), UMaterial.getCPtr(mat), mat);
  }

  public void drawQuad(SWIGTYPE_p_NLMISC__CQuadColorUV tri, UMaterial mat) {
    nel3dJNI.UDriver_drawQuad__SWIG_3(swigCPtr, this, SWIGTYPE_p_NLMISC__CQuadColorUV.getCPtr(tri), UMaterial.getCPtr(mat), mat);
  }

  public void drawQuads(SWIGTYPE_p_std__vectorT_NLMISC__CQuadColorUV_t quad, UMaterial mat) {
    nel3dJNI.UDriver_drawQuads__SWIG_0(swigCPtr, this, SWIGTYPE_p_std__vectorT_NLMISC__CQuadColorUV_t.getCPtr(quad), UMaterial.getCPtr(mat), mat);
  }

  public void drawQuads(SWIGTYPE_p_std__vectorT_NLMISC__CQuadColorUV2_t quad, UMaterial mat) {
    nel3dJNI.UDriver_drawQuads__SWIG_1(swigCPtr, this, SWIGTYPE_p_std__vectorT_NLMISC__CQuadColorUV2_t.getCPtr(quad), UMaterial.getCPtr(mat), mat);
  }

  public void drawTriangles(SWIGTYPE_p_std__vectorT_NLMISC__CTriangleColorUV_t tris, UMaterial mat) {
    nel3dJNI.UDriver_drawTriangles__SWIG_0(swigCPtr, this, SWIGTYPE_p_std__vectorT_NLMISC__CTriangleColorUV_t.getCPtr(tris), UMaterial.getCPtr(mat), mat);
  }

  public void drawQuads(SWIGTYPE_p_NLMISC__CQuadColorUV qs, long nbq, UMaterial mat) {
    nel3dJNI.UDriver_drawQuads__SWIG_2(swigCPtr, this, SWIGTYPE_p_NLMISC__CQuadColorUV.getCPtr(qs), nbq, UMaterial.getCPtr(mat), mat);
  }

  public void drawQuads(SWIGTYPE_p_NLMISC__CQuadColorUV2 quads, long nbQuads, UMaterial mat) {
    nel3dJNI.UDriver_drawQuads__SWIG_3(swigCPtr, this, SWIGTYPE_p_NLMISC__CQuadColorUV2.getCPtr(quads), nbQuads, UMaterial.getCPtr(mat), mat);
  }

  public void drawTriangles(SWIGTYPE_p_NLMISC__CTriangleColorUV tris, long nbTris, UMaterial mat) {
    nel3dJNI.UDriver_drawTriangles__SWIG_1(swigCPtr, this, SWIGTYPE_p_NLMISC__CTriangleColorUV.getCPtr(tris), nbTris, UMaterial.getCPtr(mat), mat);
  }

  public void drawBitmap(float x, float y, float width, float height, UTexture texture, boolean blend, CRGBA col) {
    nel3dJNI.UDriver_drawBitmap__SWIG_0(swigCPtr, this, x, y, width, height, UTexture.getCPtr(texture), texture, blend, CRGBA.getCPtr(col), col);
  }

  public void drawBitmap(float x, float y, float width, float height, UTexture texture, boolean blend) {
    nel3dJNI.UDriver_drawBitmap__SWIG_1(swigCPtr, this, x, y, width, height, UTexture.getCPtr(texture), texture, blend);
  }

  public void drawBitmap(float x, float y, float width, float height, UTexture texture) {
    nel3dJNI.UDriver_drawBitmap__SWIG_2(swigCPtr, this, x, y, width, height, UTexture.getCPtr(texture), texture);
  }

  public void drawLine(float x0, float y0, float x1, float y1, CRGBA col) {
    nel3dJNI.UDriver_drawLine__SWIG_4(swigCPtr, this, x0, y0, x1, y1, CRGBA.getCPtr(col), col);
  }

  public void drawLine(float x0, float y0, float x1, float y1) {
    nel3dJNI.UDriver_drawLine__SWIG_5(swigCPtr, this, x0, y0, x1, y1);
  }

  public void drawTriangle(float x0, float y0, float x1, float y1, float x2, float y2, CRGBA col) {
    nel3dJNI.UDriver_drawTriangle__SWIG_4(swigCPtr, this, x0, y0, x1, y1, x2, y2, CRGBA.getCPtr(col), col);
  }

  public void drawQuad(float x0, float y0, float x1, float y1, CRGBA col) {
    nel3dJNI.UDriver_drawQuad__SWIG_4(swigCPtr, this, x0, y0, x1, y1, CRGBA.getCPtr(col), col);
  }

  public void drawQuad(float xcenter, float ycenter, float radius, CRGBA col) {
    nel3dJNI.UDriver_drawQuad__SWIG_5(swigCPtr, this, xcenter, ycenter, radius, CRGBA.getCPtr(col), col);
  }

  public void drawWiredQuad(float x0, float y0, float x1, float y1, CRGBA col) {
    nel3dJNI.UDriver_drawWiredQuad__SWIG_0(swigCPtr, this, x0, y0, x1, y1, CRGBA.getCPtr(col), col);
  }

  public void drawWiredQuad(float xcenter, float ycenter, float radius, CRGBA col) {
    nel3dJNI.UDriver_drawWiredQuad__SWIG_1(swigCPtr, this, xcenter, ycenter, radius, CRGBA.getCPtr(col), col);
  }

  public long getImplementationVersion() {
    return nel3dJNI.UDriver_getImplementationVersion(swigCPtr, this);
  }

  public String getDriverInformation() {
    return nel3dJNI.UDriver_getDriverInformation(swigCPtr, this);
  }

  public String getVideocardInformation() {
    return nel3dJNI.UDriver_getVideocardInformation(swigCPtr, this);
  }

  public long getNbTextureStages() {
    return nel3dJNI.UDriver_getNbTextureStages(swigCPtr, this);
  }

  public void getWindowSize(SWIGTYPE_p_unsigned_int width, SWIGTYPE_p_unsigned_int height) {
    nel3dJNI.UDriver_getWindowSize(swigCPtr, this, SWIGTYPE_p_unsigned_int.getCPtr(width), SWIGTYPE_p_unsigned_int.getCPtr(height));
  }

  public long getWindowWidth() {
    return nel3dJNI.UDriver_getWindowWidth(swigCPtr, this);
  }

  public long getWindowHeight() {
    return nel3dJNI.UDriver_getWindowHeight(swigCPtr, this);
  }

  public void getWindowPos(SWIGTYPE_p_int x, SWIGTYPE_p_int y) {
    nel3dJNI.UDriver_getWindowPos(swigCPtr, this, SWIGTYPE_p_int.getCPtr(x), SWIGTYPE_p_int.getCPtr(y));
  }

  public long getAvailableVertexAGPMemory() {
    return nel3dJNI.UDriver_getAvailableVertexAGPMemory(swigCPtr, this);
  }

  public long getAvailableVertexVRAMMemory() {
    return nel3dJNI.UDriver_getAvailableVertexVRAMMemory(swigCPtr, this);
  }

  public void getBuffer(SWIGTYPE_p_NLMISC__CBitmap bitmap) {
    nel3dJNI.UDriver_getBuffer(swigCPtr, this, SWIGTYPE_p_NLMISC__CBitmap.getCPtr(bitmap));
  }

  public void getZBuffer(SWIGTYPE_p_std__vectorT_float_t zbuffer) {
    nel3dJNI.UDriver_getZBuffer(swigCPtr, this, SWIGTYPE_p_std__vectorT_float_t.getCPtr(zbuffer));
  }

  public void getBufferPart(SWIGTYPE_p_NLMISC__CBitmap bitmap, SWIGTYPE_p_NLMISC__CRect rect) {
    nel3dJNI.UDriver_getBufferPart(swigCPtr, this, SWIGTYPE_p_NLMISC__CBitmap.getCPtr(bitmap), SWIGTYPE_p_NLMISC__CRect.getCPtr(rect));
  }

  public void getZBufferPart(SWIGTYPE_p_std__vectorT_float_t zbuffer, SWIGTYPE_p_NLMISC__CRect rect) {
    nel3dJNI.UDriver_getZBufferPart(swigCPtr, this, SWIGTYPE_p_std__vectorT_float_t.getCPtr(zbuffer), SWIGTYPE_p_NLMISC__CRect.getCPtr(rect));
  }

  public boolean fillBuffer(SWIGTYPE_p_NLMISC__CBitmap bitmap) {
    return nel3dJNI.UDriver_fillBuffer(swigCPtr, this, SWIGTYPE_p_NLMISC__CBitmap.getCPtr(bitmap));
  }

  public SWIGTYPE_p_NLMISC__IMouseDevice enableLowLevelMouse(boolean enable, boolean hardware) {
    long cPtr = nel3dJNI.UDriver_enableLowLevelMouse(swigCPtr, this, enable, hardware);
    return (cPtr == 0) ? null : new SWIGTYPE_p_NLMISC__IMouseDevice(cPtr, false);
  }

  public SWIGTYPE_p_NLMISC__IKeyboardDevice enableLowLevelKeyboard(boolean enable) {
    long cPtr = nel3dJNI.UDriver_enableLowLevelKeyboard(swigCPtr, this, enable);
    return (cPtr == 0) ? null : new SWIGTYPE_p_NLMISC__IKeyboardDevice(cPtr, false);
  }

  public SWIGTYPE_p_NLMISC__IInputDeviceManager getLowLevelInputDeviceManager() {
    long cPtr = nel3dJNI.UDriver_getLowLevelInputDeviceManager(swigCPtr, this);
    return (cPtr == 0) ? null : new SWIGTYPE_p_NLMISC__IInputDeviceManager(cPtr, false);
  }

  public void emulateMouseRawMode(boolean enable) {
    nel3dJNI.UDriver_emulateMouseRawMode(swigCPtr, this, enable);
  }

  public long getDoubleClickDelay(boolean hardwareMouse) {
    return nel3dJNI.UDriver_getDoubleClickDelay(swigCPtr, this, hardwareMouse);
  }

  public void showCursor(boolean b) {
    nel3dJNI.UDriver_showCursor(swigCPtr, this, b);
  }

  public void setMousePos(float x, float y) {
    nel3dJNI.UDriver_setMousePos(swigCPtr, this, x, y);
  }

  public void setCapture(boolean b) {
    nel3dJNI.UDriver_setCapture(swigCPtr, this, b);
  }

  public boolean isSystemCursorCaptured() {
    return nel3dJNI.UDriver_isSystemCursorCaptured(swigCPtr, this);
  }

  public void addCursor(String name, SWIGTYPE_p_NLMISC__CBitmap bitmap) {
    nel3dJNI.UDriver_addCursor(swigCPtr, this, name, SWIGTYPE_p_NLMISC__CBitmap.getCPtr(bitmap));
  }

  public void setCursor(String name, CRGBA col, short rot, int hotSpotX, int hotSpotY, boolean forceRebuild) {
    nel3dJNI.UDriver_setCursor__SWIG_0(swigCPtr, this, name, CRGBA.getCPtr(col), col, rot, hotSpotX, hotSpotY, forceRebuild);
  }

  public void setCursor(String name, CRGBA col, short rot, int hotSpotX, int hotSpotY) {
    nel3dJNI.UDriver_setCursor__SWIG_1(swigCPtr, this, name, CRGBA.getCPtr(col), col, rot, hotSpotX, hotSpotY);
  }

  public void setCursorScale(float scale) {
    nel3dJNI.UDriver_setCursorScale(swigCPtr, this, scale);
  }

  public UDriver.TMessageBoxId systemMessageBox(String message, String title, UDriver.TMessageBoxType type, UDriver.TMessageBoxIcon icon) {
    return UDriver.TMessageBoxId.swigToEnum(nel3dJNI.UDriver_systemMessageBox__SWIG_0(swigCPtr, this, message, title, type.swigValue(), icon.swigValue()));
  }

  public UDriver.TMessageBoxId systemMessageBox(String message, String title, UDriver.TMessageBoxType type) {
    return UDriver.TMessageBoxId.swigToEnum(nel3dJNI.UDriver_systemMessageBox__SWIG_1(swigCPtr, this, message, title, type.swigValue()));
  }

  public UDriver.TMessageBoxId systemMessageBox(String message, String title) {
    return UDriver.TMessageBoxId.swigToEnum(nel3dJNI.UDriver_systemMessageBox__SWIG_2(swigCPtr, this, message, title));
  }

  public void setPolygonMode(UDriver.TPolygonMode mode) {
    nel3dJNI.UDriver_setPolygonMode(swigCPtr, this, mode.swigValue());
  }

  public UDriver.TPolygonMode getPolygonMode() {
    return UDriver.TPolygonMode.swigToEnum(nel3dJNI.UDriver_getPolygonMode(swigCPtr, this));
  }

  public U3dMouseListener create3dMouseListener() {
    long cPtr = nel3dJNI.UDriver_create3dMouseListener(swigCPtr, this);
    return (cPtr == 0) ? null : new U3dMouseListener(cPtr, false);
  }

  public void delete3dMouseListener(U3dMouseListener listener) {
    nel3dJNI.UDriver_delete3dMouseListener(swigCPtr, this, U3dMouseListener.getCPtr(listener), listener);
  }

  public void forceDXTCCompression(boolean dxtcComp) {
    nel3dJNI.UDriver_forceDXTCCompression(swigCPtr, this, dxtcComp);
  }

  public void forceTextureResize(long divisor) {
    nel3dJNI.UDriver_forceTextureResize(swigCPtr, this, divisor);
  }

  public void forceNativeFragmentPrograms(boolean nativeOnly) {
    nel3dJNI.UDriver_forceNativeFragmentPrograms(swigCPtr, this, nativeOnly);
  }

  public boolean setMonitorColorProperties(CMonitorColorProperties properties) {
    return nel3dJNI.UDriver_setMonitorColorProperties(swigCPtr, this, CMonitorColorProperties.getCPtr(properties), properties);
  }

  public UShapeBank getShapeBank() {
    long cPtr = nel3dJNI.UDriver_getShapeBank(swigCPtr, this);
    return (cPtr == 0) ? null : new UShapeBank(cPtr, false);
  }

  public void profileRenderedPrimitives(CPrimitiveProfile pIn, CPrimitiveProfile pOut) {
    nel3dJNI.UDriver_profileRenderedPrimitives(swigCPtr, this, CPrimitiveProfile.getCPtr(pIn), pIn, CPrimitiveProfile.getCPtr(pOut), pOut);
  }

  public long profileAllocatedTextureMemory() {
    return nel3dJNI.UDriver_profileAllocatedTextureMemory(swigCPtr, this);
  }

  public long profileSetupedMaterials() {
    return nel3dJNI.UDriver_profileSetupedMaterials(swigCPtr, this);
  }

  public long profileSetupedModelMatrix() {
    return nel3dJNI.UDriver_profileSetupedModelMatrix(swigCPtr, this);
  }

  public void enableUsedTextureMemorySum(boolean enable) {
    nel3dJNI.UDriver_enableUsedTextureMemorySum__SWIG_0(swigCPtr, this, enable);
  }

  public void enableUsedTextureMemorySum() {
    nel3dJNI.UDriver_enableUsedTextureMemorySum__SWIG_1(swigCPtr, this);
  }

  public long getUsedTextureMemory() {
    return nel3dJNI.UDriver_getUsedTextureMemory(swigCPtr, this);
  }

  public void startProfileVBHardLock() {
    nel3dJNI.UDriver_startProfileVBHardLock(swigCPtr, this);
  }

  public void endProfileVBHardLock(Vector_String result) {
    nel3dJNI.UDriver_endProfileVBHardLock(swigCPtr, this, Vector_String.getCPtr(result), result);
  }

  public void profileVBHardAllocation(Vector_String result) {
    nel3dJNI.UDriver_profileVBHardAllocation(swigCPtr, this, Vector_String.getCPtr(result), result);
  }

  public void startProfileIBLock() {
    nel3dJNI.UDriver_startProfileIBLock(swigCPtr, this);
  }

  public void endProfileIBLock(Vector_String result) {
    nel3dJNI.UDriver_endProfileIBLock(swigCPtr, this, Vector_String.getCPtr(result), result);
  }

  public void profileIBAllocation(Vector_String result) {
    nel3dJNI.UDriver_profileIBAllocation(swigCPtr, this, Vector_String.getCPtr(result), result);
  }

  public void profileTextureUsage(Vector_String result) {
    nel3dJNI.UDriver_profileTextureUsage(swigCPtr, this, Vector_String.getCPtr(result), result);
  }

  public void setupAsyncTextureLod(long baseLevel, long maxLevel) {
    nel3dJNI.UDriver_setupAsyncTextureLod(swigCPtr, this, baseLevel, maxLevel);
  }

  public void setupAsyncTextureMaxUploadPerFrame(long maxup) {
    nel3dJNI.UDriver_setupAsyncTextureMaxUploadPerFrame(swigCPtr, this, maxup);
  }

  public void setupMaxTotalAsyncTextureSize(long maxText) {
    nel3dJNI.UDriver_setupMaxTotalAsyncTextureSize(swigCPtr, this, maxText);
  }

  public void setupMaxHLSColoringPerFrame(long maxCol) {
    nel3dJNI.UDriver_setupMaxHLSColoringPerFrame(swigCPtr, this, maxCol);
  }

  public void updateAsyncTexture() {
    nel3dJNI.UDriver_updateAsyncTexture(swigCPtr, this);
  }

  public long getTotalAsyncTextureSizeAsked() {
    return nel3dJNI.UDriver_getTotalAsyncTextureSizeAsked(swigCPtr, this);
  }

  public long getLastAsyncTextureSizeGot() {
    return nel3dJNI.UDriver_getLastAsyncTextureSizeGot(swigCPtr, this);
  }

  public void loadHLSBank(String fileName) {
    nel3dJNI.UDriver_loadHLSBank(swigCPtr, this, fileName);
  }

  public boolean supportMADOperator() {
    return nel3dJNI.UDriver_supportMADOperator(swigCPtr, this);
  }

  public boolean supportBloomEffect() {
    return nel3dJNI.UDriver_supportBloomEffect(swigCPtr, this);
  }

  public void startBench(boolean wantStandardDeviation, boolean quick, boolean reset) {
    nel3dJNI.UDriver_startBench__SWIG_0(swigCPtr, this, wantStandardDeviation, quick, reset);
  }

  public void startBench(boolean wantStandardDeviation, boolean quick) {
    nel3dJNI.UDriver_startBench__SWIG_1(swigCPtr, this, wantStandardDeviation, quick);
  }

  public void startBench(boolean wantStandardDeviation) {
    nel3dJNI.UDriver_startBench__SWIG_2(swigCPtr, this, wantStandardDeviation);
  }

  public void startBench() {
    nel3dJNI.UDriver_startBench__SWIG_3(swigCPtr, this);
  }

  public void endBench() {
    nel3dJNI.UDriver_endBench(swigCPtr, this);
  }

  public void displayBench(SWIGTYPE_p_NLMISC__CLog log) {
    nel3dJNI.UDriver_displayBench(swigCPtr, this, SWIGTYPE_p_NLMISC__CLog.getCPtr(log));
  }

  public UWaterEnvMap createWaterEnvMap() {
    long cPtr = nel3dJNI.UDriver_createWaterEnvMap(swigCPtr, this);
    return (cPtr == 0) ? null : new UWaterEnvMap(cPtr, false);
  }

  public void deleteWaterEnvMap(UWaterEnvMap arg0) {
    nel3dJNI.UDriver_deleteWaterEnvMap(swigCPtr, this, UWaterEnvMap.getCPtr(arg0), arg0);
  }

  public java.math.BigInteger getSwapBufferCounter() {
    return nel3dJNI.UDriver_getSwapBufferCounter(swigCPtr, this);
  }

  public boolean copyTextToClipboard(SWIGTYPE_p_ucstring text) {
    return nel3dJNI.UDriver_copyTextToClipboard(swigCPtr, this, SWIGTYPE_p_ucstring.getCPtr(text));
  }

  public boolean pasteTextFromClipboard(SWIGTYPE_p_ucstring text) {
    return nel3dJNI.UDriver_pasteTextFromClipboard(swigCPtr, this, SWIGTYPE_p_ucstring.getCPtr(text));
  }

  public static UDriver createDriver(long windowIcon, boolean direct3d, SWIGTYPE_p_f_void__void exitFunc) {
    long cPtr = nel3dJNI.UDriver_createDriver__SWIG_0(windowIcon, direct3d, SWIGTYPE_p_f_void__void.getCPtr(exitFunc));
    return (cPtr == 0) ? null : new UDriver(cPtr, false);
  }

  public static UDriver createDriver(long windowIcon, boolean direct3d) {
    long cPtr = nel3dJNI.UDriver_createDriver__SWIG_1(windowIcon, direct3d);
    return (cPtr == 0) ? null : new UDriver(cPtr, false);
  }

  public static UDriver createDriver(long windowIcon) {
    long cPtr = nel3dJNI.UDriver_createDriver__SWIG_2(windowIcon);
    return (cPtr == 0) ? null : new UDriver(cPtr, false);
  }

  public static UDriver createDriver() {
    long cPtr = nel3dJNI.UDriver_createDriver__SWIG_3();
    return (cPtr == 0) ? null : new UDriver(cPtr, false);
  }

  public static void purgeMemory() {
    nel3dJNI.UDriver_purgeMemory();
  }

  public final static class TMessageBoxId {
    public final static TMessageBoxId okId = new TMessageBoxId("okId", nel3dJNI.UDriver_okId_get());
    public final static TMessageBoxId yesId = new TMessageBoxId("yesId");
    public final static TMessageBoxId noId = new TMessageBoxId("noId");
    public final static TMessageBoxId abortId = new TMessageBoxId("abortId");
    public final static TMessageBoxId retryId = new TMessageBoxId("retryId");
    public final static TMessageBoxId cancelId = new TMessageBoxId("cancelId");
    public final static TMessageBoxId ignoreId = new TMessageBoxId("ignoreId");
    public final static TMessageBoxId idCount = new TMessageBoxId("idCount");

    public final int swigValue() {
      return swigValue;
    }

    public String toString() {
      return swigName;
    }

    public static TMessageBoxId swigToEnum(int swigValue) {
      if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
        return swigValues[swigValue];
      for (int i = 0; i < swigValues.length; i++)
        if (swigValues[i].swigValue == swigValue)
          return swigValues[i];
      throw new IllegalArgumentException("No enum " + TMessageBoxId.class + " with value " + swigValue);
    }

    private TMessageBoxId(String swigName) {
      this.swigName = swigName;
      this.swigValue = swigNext++;
    }

    private TMessageBoxId(String swigName, int swigValue) {
      this.swigName = swigName;
      this.swigValue = swigValue;
      swigNext = swigValue+1;
    }

    private TMessageBoxId(String swigName, TMessageBoxId swigEnum) {
      this.swigName = swigName;
      this.swigValue = swigEnum.swigValue;
      swigNext = this.swigValue+1;
    }

    private static TMessageBoxId[] swigValues = { okId, yesId, noId, abortId, retryId, cancelId, ignoreId, idCount };
    private static int swigNext = 0;
    private final int swigValue;
    private final String swigName;
  }

  public final static class TMessageBoxType {
    public final static TMessageBoxType okType = new TMessageBoxType("okType", nel3dJNI.UDriver_okType_get());
    public final static TMessageBoxType okCancelType = new TMessageBoxType("okCancelType");
    public final static TMessageBoxType yesNoType = new TMessageBoxType("yesNoType");
    public final static TMessageBoxType abortRetryIgnoreType = new TMessageBoxType("abortRetryIgnoreType");
    public final static TMessageBoxType yesNoCancelType = new TMessageBoxType("yesNoCancelType");
    public final static TMessageBoxType retryCancelType = new TMessageBoxType("retryCancelType");
    public final static TMessageBoxType typeCount = new TMessageBoxType("typeCount");

    public final int swigValue() {
      return swigValue;
    }

    public String toString() {
      return swigName;
    }

    public static TMessageBoxType swigToEnum(int swigValue) {
      if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
        return swigValues[swigValue];
      for (int i = 0; i < swigValues.length; i++)
        if (swigValues[i].swigValue == swigValue)
          return swigValues[i];
      throw new IllegalArgumentException("No enum " + TMessageBoxType.class + " with value " + swigValue);
    }

    private TMessageBoxType(String swigName) {
      this.swigName = swigName;
      this.swigValue = swigNext++;
    }

    private TMessageBoxType(String swigName, int swigValue) {
      this.swigName = swigName;
      this.swigValue = swigValue;
      swigNext = swigValue+1;
    }

    private TMessageBoxType(String swigName, TMessageBoxType swigEnum) {
      this.swigName = swigName;
      this.swigValue = swigEnum.swigValue;
      swigNext = this.swigValue+1;
    }

    private static TMessageBoxType[] swigValues = { okType, okCancelType, yesNoType, abortRetryIgnoreType, yesNoCancelType, retryCancelType, typeCount };
    private static int swigNext = 0;
    private final int swigValue;
    private final String swigName;
  }

  public final static class TMessageBoxIcon {
    public final static TMessageBoxIcon noIcon = new TMessageBoxIcon("noIcon", nel3dJNI.UDriver_noIcon_get());
    public final static TMessageBoxIcon handIcon = new TMessageBoxIcon("handIcon");
    public final static TMessageBoxIcon questionIcon = new TMessageBoxIcon("questionIcon");
    public final static TMessageBoxIcon exclamationIcon = new TMessageBoxIcon("exclamationIcon");
    public final static TMessageBoxIcon asteriskIcon = new TMessageBoxIcon("asteriskIcon");
    public final static TMessageBoxIcon warningIcon = new TMessageBoxIcon("warningIcon");
    public final static TMessageBoxIcon errorIcon = new TMessageBoxIcon("errorIcon");
    public final static TMessageBoxIcon informationIcon = new TMessageBoxIcon("informationIcon");
    public final static TMessageBoxIcon stopIcon = new TMessageBoxIcon("stopIcon");
    public final static TMessageBoxIcon iconCount = new TMessageBoxIcon("iconCount");

    public final int swigValue() {
      return swigValue;
    }

    public String toString() {
      return swigName;
    }

    public static TMessageBoxIcon swigToEnum(int swigValue) {
      if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
        return swigValues[swigValue];
      for (int i = 0; i < swigValues.length; i++)
        if (swigValues[i].swigValue == swigValue)
          return swigValues[i];
      throw new IllegalArgumentException("No enum " + TMessageBoxIcon.class + " with value " + swigValue);
    }

    private TMessageBoxIcon(String swigName) {
      this.swigName = swigName;
      this.swigValue = swigNext++;
    }

    private TMessageBoxIcon(String swigName, int swigValue) {
      this.swigName = swigName;
      this.swigValue = swigValue;
      swigNext = swigValue+1;
    }

    private TMessageBoxIcon(String swigName, TMessageBoxIcon swigEnum) {
      this.swigName = swigName;
      this.swigValue = swigEnum.swigValue;
      swigNext = this.swigValue+1;
    }

    private static TMessageBoxIcon[] swigValues = { noIcon, handIcon, questionIcon, exclamationIcon, asteriskIcon, warningIcon, errorIcon, informationIcon, stopIcon, iconCount };
    private static int swigNext = 0;
    private final int swigValue;
    private final String swigName;
  }

  public final static class TPolygonMode {
    public final static TPolygonMode Filled = new TPolygonMode("Filled", nel3dJNI.UDriver_Filled_get());
    public final static TPolygonMode Line = new TPolygonMode("Line");
    public final static TPolygonMode Point = new TPolygonMode("Point");

    public final int swigValue() {
      return swigValue;
    }

    public String toString() {
      return swigName;
    }

    public static TPolygonMode swigToEnum(int swigValue) {
      if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
        return swigValues[swigValue];
      for (int i = 0; i < swigValues.length; i++)
        if (swigValues[i].swigValue == swigValue)
          return swigValues[i];
      throw new IllegalArgumentException("No enum " + TPolygonMode.class + " with value " + swigValue);
    }

    private TPolygonMode(String swigName) {
      this.swigName = swigName;
      this.swigValue = swigNext++;
    }

    private TPolygonMode(String swigName, int swigValue) {
      this.swigName = swigName;
      this.swigValue = swigValue;
      swigNext = swigValue+1;
    }

    private TPolygonMode(String swigName, TPolygonMode swigEnum) {
      this.swigName = swigName;
      this.swigValue = swigEnum.swigValue;
      swigNext = this.swigValue+1;
    }

    private static TPolygonMode[] swigValues = { Filled, Line, Point };
    private static int swigNext = 0;
    private final int swigValue;
    private final String swigName;
  }

  public final static class TCullMode {
    public final static TCullMode CCW = new TCullMode("CCW", nel3dJNI.UDriver_CCW_get());
    public final static TCullMode CW = new TCullMode("CW");

    public final int swigValue() {
      return swigValue;
    }

    public String toString() {
      return swigName;
    }

    public static TCullMode swigToEnum(int swigValue) {
      if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
        return swigValues[swigValue];
      for (int i = 0; i < swigValues.length; i++)
        if (swigValues[i].swigValue == swigValue)
          return swigValues[i];
      throw new IllegalArgumentException("No enum " + TCullMode.class + " with value " + swigValue);
    }

    private TCullMode(String swigName) {
      this.swigName = swigName;
      this.swigValue = swigNext++;
    }

    private TCullMode(String swigName, int swigValue) {
      this.swigName = swigName;
      this.swigValue = swigValue;
      swigNext = swigValue+1;
    }

    private TCullMode(String swigName, TCullMode swigEnum) {
      this.swigName = swigName;
      this.swigValue = swigEnum.swigValue;
      swigNext = this.swigValue+1;
    }

    private static TCullMode[] swigValues = { CCW, CW };
    private static int swigNext = 0;
    private final int swigValue;
    private final String swigName;
  }

  public final static class TStencilOp {
    public final static TStencilOp keep = new TStencilOp("keep", nel3dJNI.UDriver_keep_get());
    public final static TStencilOp zero = new TStencilOp("zero");
    public final static TStencilOp replace = new TStencilOp("replace");
    public final static TStencilOp incr = new TStencilOp("incr");
    public final static TStencilOp decr = new TStencilOp("decr");
    public final static TStencilOp invert = new TStencilOp("invert");

    public final int swigValue() {
      return swigValue;
    }

    public String toString() {
      return swigName;
    }

    public static TStencilOp swigToEnum(int swigValue) {
      if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
        return swigValues[swigValue];
      for (int i = 0; i < swigValues.length; i++)
        if (swigValues[i].swigValue == swigValue)
          return swigValues[i];
      throw new IllegalArgumentException("No enum " + TStencilOp.class + " with value " + swigValue);
    }

    private TStencilOp(String swigName) {
      this.swigName = swigName;
      this.swigValue = swigNext++;
    }

    private TStencilOp(String swigName, int swigValue) {
      this.swigName = swigName;
      this.swigValue = swigValue;
      swigNext = swigValue+1;
    }

    private TStencilOp(String swigName, TStencilOp swigEnum) {
      this.swigName = swigName;
      this.swigValue = swigEnum.swigValue;
      swigNext = this.swigValue+1;
    }

    private static TStencilOp[] swigValues = { keep, zero, replace, incr, decr, invert };
    private static int swigNext = 0;
    private final int swigValue;
    private final String swigName;
  }

  public final static class TStencilFunc {
    public final static TStencilFunc never = new TStencilFunc("never", nel3dJNI.UDriver_never_get());
    public final static TStencilFunc less = new TStencilFunc("less");
    public final static TStencilFunc lessequal = new TStencilFunc("lessequal");
    public final static TStencilFunc equal = new TStencilFunc("equal");
    public final static TStencilFunc notequal = new TStencilFunc("notequal");
    public final static TStencilFunc greaterequal = new TStencilFunc("greaterequal");
    public final static TStencilFunc greater = new TStencilFunc("greater");
    public final static TStencilFunc always = new TStencilFunc("always");

    public final int swigValue() {
      return swigValue;
    }

    public String toString() {
      return swigName;
    }

    public static TStencilFunc swigToEnum(int swigValue) {
      if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
        return swigValues[swigValue];
      for (int i = 0; i < swigValues.length; i++)
        if (swigValues[i].swigValue == swigValue)
          return swigValues[i];
      throw new IllegalArgumentException("No enum " + TStencilFunc.class + " with value " + swigValue);
    }

    private TStencilFunc(String swigName) {
      this.swigName = swigName;
      this.swigValue = swigNext++;
    }

    private TStencilFunc(String swigName, int swigValue) {
      this.swigName = swigName;
      this.swigValue = swigValue;
      swigNext = swigValue+1;
    }

    private TStencilFunc(String swigName, TStencilFunc swigEnum) {
      this.swigName = swigName;
      this.swigValue = swigEnum.swigValue;
      swigNext = this.swigValue+1;
    }

    private static TStencilFunc[] swigValues = { never, less, lessequal, equal, notequal, greaterequal, greater, always };
    private static int swigNext = 0;
    private final int swigValue;
    private final String swigName;
  }

}
